package com.ynny.example01;

/**
 * 圆柱类
 */
public class Cylinder {
    //圆柱的体积 : 底面积 * 高
    //           圆的面积 * 高
   private double r;
   private double height;

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
    //计算 圆柱的体积
    public  double findVolume(){
        //
        double s = 3.14 * r * r * height;
        return s;
    }
}
